<template>
  <div>
    <el-form v-model="queryObj" label-width="100px" size="large">
      <el-row>
        <el-col :span="5" style="margin-right:15px">
          <el-form-item label="排：">
            <el-input v-model.trim="queryObj.row" placeholder="请输入排" />
          </el-form-item>
        </el-col>
        <el-col :span="5" style="margin-right:15px">
          <el-form-item label="列：">
            <el-input v-model.trim="queryObj.bay" placeholder="请输入列" />
          </el-form-item>
        </el-col>
        <el-col :span="5" style="margin-right:15px">
          <el-form-item label="层：">
            <el-input v-model.trim="queryObj.lev" placeholder="请输入层" />
          </el-form-item>
        </el-col>
        <el-col v-show="isopen" :span="5" style="margin-right:15px">
          <el-form-item label="货位名：">
            <el-input v-model.trim="queryObj.wcsLocName" placeholder="请输入wcs货位名" />
          </el-form-item>
        </el-col>
        <el-col v-show="isopen" :span="5" style="margin-right:15px">
          <el-form-item label="托盘号：">
            <el-input v-model.trim="queryObj.unitId" placeholder="请输入托盘号" />
          </el-form-item>
        </el-col>
        <el-col v-show="isopen" :span="5" style="margin-right:15px">
          <el-form-item label="货位状态：">
            <el-input v-model.trim="queryObj.locStatus" placeholder="请输入货位状态" />
          </el-form-item>
        </el-col>
        <el-col v-show="isopen" :span="5" style="margin-right:15px">
          <el-form-item label="是否锁定：">
            <el-input v-model.trim="queryObj.isLock" placeholder="请输入是否锁定" />
          </el-form-item>
        </el-col>
        <el-col v-show="isopen" :span="5" style="margin-right:15px">
          <el-form-item label="货位类型：">
            <el-input v-model.trim="queryObj.locType" placeholder="请输入货位类型" />
          </el-form-item>
        </el-col>
        <el-col v-show="isopen" :span="5" style="margin-right:15px">
          <el-form-item label="巷道号：">
            <el-input v-model.trim="queryObj.aisle" placeholder="请输入巷道号" />
          </el-form-item>
        </el-col>
        <el-col v-show="isopen" :span="5" style="margin-right:15px">
          <el-form-item label="基准货架：">
            <el-input v-model.trim="queryObj.basicShelf" placeholder="请输入基准货架" />
          </el-form-item>
        </el-col>
        <el-col v-show="isopen" :span="5" style="margin-right:15px">
          <el-form-item label="区域：">
            <el-input v-model.trim="queryObj.zoneName" placeholder="请输入区域" />
          </el-form-item>
        </el-col>
        <el-col v-show="isopen" :span="5" style="margin-right:15px">
          <el-form-item label="WCS区域：">
            <el-input v-model.trim="queryObj.wcsZone" placeholder="请输入WCS区域" />
          </el-form-item>
        </el-col>
        <searchbutton :isopen="isopen" @isopenclickfn="isopenclick" @resetQueryfn="resetQueryfn" @queryClickfn="queryClickfn" />

        <!-- <el-col :span="6" style="float:right;">
          <el-button type="primary" @click="queryClickfn">搜索</el-button>
          <el-button @click="resetQueryfn">重置</el-button>
          <el-button type="text" @click="isopen = !isopen">{{
            isopen ? "收起" : "展开"
          }}</el-button>
        </el-col> -->
      </el-row>
    </el-form>
  </div>
</template>

<script>
export default {
  props: {
    queryObj: {
      type: Object,
      required: true
    }
  },
  data() {
    return {
      isopen: false
    }
  },
  methods: {
    // 搜索按钮
    queryClickfn() {
      this.$emit('queryClickfn')
    },
    // 重置
    resetQueryfn() {
      this.$emit('resetQueryfn')
    },
    // 展开收起
    isopenclick() {
      this.isopen = !this.isopen
    }
  }
}
</script>

<style>

</style>
